id_card = "110101199003074512"
A = 0
B = 5
print(id_card[A:B])
#正引索
C = 6
D = 10
print(id_card[C:D])
#负引索
print(id_card[-12:-8])
#出生月
birth_month = id_card[10:12]
birth_day = id_card[12:14]
csn = id_card[C:D]
print("出生年月日：",csn,"年",birth_month,"月",birth_day,"日")
#根据身份证号获取性别信息
xb = int(id_card[16])
i = xb
if i%2 == 0:
    print("女")
else:                  
    print("男") 